feat: introduces "Sub-lobsters": nested lobster workflows with optional loop#20
feat: introduces "Sub-lobsters": nested lobster workflows with optional loop#20ggondim wants to merge 7 commits intoopenclaw:mainfrom
Conversation
Co-authored-by: ggondim <2074685+ggondim@users.noreply.github.com>
Co-authored-by: ggondim <2074685+ggondim@users.noreply.github.com>
Add `lobster` sub-workflow step with optional loop
Co-authored-by: ggondim <2074685+ggondim@users.noreply.github.com>
docs: document `lobster` sub-workflow step in README
|
The primary upside of lobster is visibility and approval gating. Having an invisible sub loop running - especially compared to a Ralph loop concerns me. I don't think this is the intended direction for lobster. |
|
@vignesh07 Should Lobster be so opinionated and make the experience with deterministic workflows more challenging by imposing single-level-only workflows? The arguments to merge it:
I understand if this doesn’t align with the team’s vision. Please let me know, and I’ll create a custom plugin for myself. Thank you for your time. |
|
I would also agree and want this feature. i have gone through the same process to find something for autonmous coding and landed at the same end state. Otherwise no one will adopt lobster as a wokflow engine and build something else instead without this feature. Loops are a common pattern in any mature workflow engine and a great feature to have. |
|
Great feature, I have been planning a way to implement deterministic agentic flows and came across @ggondim article in DEV Community. Thank you for dedicating the time to make this feature. A valuable use case I have found for this is chaining smaller LLM's that are specialized for a specific niche of the problem at large. I am experimenting with 32b models that don't have great orchestration control but to make up for that I want code to link the agents. A linear track works in some use cases, but loops are essential to complex thought and evaluation chains. I look forward to keeping up with this pull request and if the team decides it is not part of their vision I look forward to @ggondim custom plugin. |
|
Hey @IanHansonR thanks for supporting this PR. While I await for the maintainers' response on it, I've created canonical-agents and duckflux. My last step this week will be a custom OpenClaw plugin to implement the duckflux runtime inside it. |
🚀 Sub-workflow step support
lobster,args, andloopfields to theWorkflowSteptype, enabling steps to reference and run sub-workflows, pass arguments, and repeat execution with optional conditions. (src/workflows/file.tssrc/workflows/file.tsR19-R31)src/workflows/file.ts[1] [2]🔰 Validation improvements
lobstersteps require a non-empty file path and that step IDs are unique. (src/workflows/file.tssrc/workflows/file.tsR111-L105)📝 Documentation updates
README.md:Step fields
id$id.stdoutor$id.json.commandlobster.lobster.lobsterfile to run as a sub-workflow (resolved relative to the parent workflow). Mutually exclusive withcommand.args${arg}and$stepId.stdout/$stepId.jsontemplate syntax. Only valid whenlobsteris set.looplobsteris set.loop.maxIterationsloopis set)loop.conditionLOBSTER_LOOP_STDOUT,LOBSTER_LOOP_JSON, andLOBSTER_LOOP_ITERATIONas environment variables.stdinapprovalrequiredto insert an approval gate before the step runs.conditionSub-workflow step example
Use the
lobsterfield to embed another.lobsterfile as a step in your workflow, optionally passing arguments and looping until a condition is met:The sub-workflow's last step result (stdout/json) is stored as the step result and is accessible via
$process.stdout/$process.jsonin subsequent steps.134 changes: 129 additions & 5 deletions134
src/workflows/file.ts
✅ Testing
test/lobster_sub_step.test.tstest/lobster_sub_step.test.tsR1-R186)